package com.niiwoo.civet.trade.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Created by bincun on 2017/12/13.
 */
@Getter
@AllArgsConstructor
public enum GenerateSourcePlanEnum {
    FORM_LEND((byte)0,"计划来源于放款(默认)"),
    FROM_BAD((byte)1,"计划来源于坏账"),
    FROM_GUARANTEE((byte)2,"来源于代偿（仅债权表使用）");

    private Byte value;
    private String desc;

    public GenerateSourcePlanEnum enumOf(Byte value){
        for (GenerateSourcePlanEnum enumResult : GenerateSourcePlanEnum.values()){
            if (enumResult.getValue().equals(value)){
                return enumResult;
            }
        }
        return null;
    }
}
